✨ Annotate commands with version metadata#21
Merged
Conversation
Add a Deprecated field to the docs serializer beside Since (both from cobra Annotations, omitempty) and backfill a since annotation on every command so ws-docs renders per-command version badges, matching env vars. Released groups floor to 0.2.0; the unreleased seed and editor groups use next, which the workspace release codemod resolves to the cut version. Regenerate commands.yaml and add a guard test asserting every command carries a since annotation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bring
ws-clicommands to per-item version-annotation parity with env vars, so the ws-docs command reference renders "Since v…" / "Deprecated v…" badges per command — now that ws-cli is versionless (q3-2) and commands are versioned by the workspace release.Changes
internals/docs/serialize.go— add aDeprecatedfield besideSince(both from cobraAnnotations,omitempty); blankSincewhenDeprecatedis set socommands.yamlcarries a single version marker (deprecated supersedes since at the data level).cmd/**/*.go— backfill asinceannotation on every command (no cobra inheritance, leaves included): released groups floor to0.2.0; the unreleased seed and editor groups usenext, which the workspace release codemod resolves to the cut version.commands.yaml— regenerated viatools/gen-commands.since/deprecated/supersede matrix;TestEveryCommandCarriesVersionguard (every command carriessinceordeprecated, walked over the emitted tree) so a future command added without an annotation fails CI.Notes
show env --checksurface touched.generate-commands.mjs) lands separately; the badge is dormant until a real deprecation + distribution.